package com.cx.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Comment {
//    主键
    private Integer id;
//    评论者id
    private Integer userId;
//    评论内容
    private String plContent;
//    评论时间
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date plTime;
//    评论上一级的id
    private Integer pid;
    //    用户信息
    private User user;
//    子级评论
    private List<Comment> comments;
}
